package com.tedu.bill.demo9;

/**
 * Author：毕龙
 * Date: 2024/4/19 10:22
 */
public class TestArray1 {
    public static void main(String[] args) {
        //直接数组初始化
        int[] arr = {1,2,3,4,5};
        System.out.println(arr.length);
        System.out.println(arr[3]);

        //数组的遍历
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }

        String[] strs = {"曹洋","雷小花","林嘉伟"};
        for (int i = 0; i < strs.length; i++) {
            System.out.println(strs[i].charAt(0));
        }
    }
}
